<%--
  Created by IntelliJ IDEA.
  User: Alex
  Date: 2023/11/29
  Time: 9:05
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ page import="lzit.dao.ShanghusDao" %>
<%@ page import="lzit.entity.Shanghus" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>编辑商户信息</title>
</head>
<body>
    <%
        request.setCharacterEncoding("utf-8");
        response.setContentType("text/html;charset=utf-8");
        String id = request.getParameter("id");
        ShanghusDao dao = new ShanghusDao();
        Shanghus shanghu = dao.findShById(Integer.parseInt(id));
        if (shanghu!=null){
    %>
    <table width="90%" border="0">
        <tr>
            <td align="center">编辑商户信息</td>
        </tr>
        <tr>
            <td align="center">
                <form name="form1" method="post" action="updateShanghu.jsp?id=<%=id%>">
                    <table width="90%" border="0">
                        <tr>
                            <td width="28%" align="right">商户名称</td>
                            <td width="72%" align="left"><input type="text" name="xm" value="<%=shanghu.getSh_name()%>"></td>
                        </tr>
                        <tr>
                            <td align="right">区域</td>
                            <td align="left"><input type="text" name="qy" value="<%=shanghu.getSh_quyu()%>"></td>
                        </tr>
                        <tr>
                            <td align="right">联系人</td>
                            <td align="left"><input type="text" name="lxr" value="<%=shanghu.getSh_lianxiren()%>"></td>
                        </tr>
                        <tr>
                            <td align="right">电话</td>
                            <td align="left"><input type="text" name="dh" value="<%=shanghu.getSh_dianhua()%>"></td>
                        </tr>
                    </table>
                    <p>
                        <input type="submit" name="Submit" value="更新商户信息">
                    </p>
                </form>
            </td>
        </tr>
    </table>
    <%
        }
    %>
</body>
</html>
